package coletaDados;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.TreeSet;

import twitter4j.Twitter;
import twitter4j.User;

public abstract class Busca {
	protected int maxProfiles, countProfiles = 1, qntPaginas;
	protected Twitter twitter;
	protected DBStatus bancoDeStatus;
	protected List<User> proximos = new ArrayList<User>();
	protected Map<String, Boolean> jaPassou = new HashMap<String, Boolean>();
	protected Set<Integer> jaColetados = new TreeSet<Integer>();
	
	public Busca(Twitter t, int maxProfiles, int qntPaginas, DBStatus db){
		this.twitter = t;
		this.maxProfiles = maxProfiles;
		this.qntPaginas = qntPaginas;
		this.bancoDeStatus = db;
	}
	
	public abstract void executarBuscaPorReferenciados(User usuarioInicial);
	public abstract void encontrarProximosPorReferenciados(List<String> status);
	public abstract void encontrarProximosPorAmigos(User user);
	public abstract void executarBuscaPorAmigos(User usuarioInicial);

	public void inicializarBusca() {
		proximos.clear();
		countProfiles=0;
		jaPassou.clear();
		jaColetados.clear();
	}
}
